/*
Plugin Name: 	smoothScroll for jQuery.
Written by: 	Okler Themes - (http://www.okler.net)
Version: 		3.1.0
Based on:
	SmoothScroll v1.2.1
	Licensed under the terms of the MIT license.
	People involved
	 - Balazs Galambosi (maintainer)
	 - Patrick Brunner  (original idea)
	 - Michael Herf     (Pulse Algorithm)
*/
!function(e){e.extend({smoothScroll:function(){function e(){var e=!1;if(document.URL.indexOf("google.com/reader/view")>-1&&(e=!0),b.excluded){var t=b.excluded.split(/[,\n] ?/);t.push("mail.google.com");for(var n=t.length;n--;)if(document.URL.indexOf(t[n])>-1){w&&w.disconnect(),s("mousewheel",o),e=!0,y=!0;break}}e&&s("keydown",r),b.keyboardSupport&&!e&&l("keydown",r)}function t(){if(document.body){var t=document.body,n=document.documentElement,o=window.innerHeight,r=t.scrollHeight;if(I=document.compatMode.indexOf("CSS")>=0?n:t,v=t,e(),T=!0,top!=self)x=!0;else if(r>o&&(t.offsetHeight<=o||n.offsetHeight<=o)){var a=!1,i=function(){a||n.scrollHeight==document.height||(a=!0,setTimeout(function(){n.style.height=document.height+"px",a=!1},500))};n.style.height="auto",setTimeout(i,10);var c={attributes:!0,childList:!0,characterData:!1};if(w=new O(i),w.observe(t,c),I.offsetHeight<=o){var l=document.createElement("div");l.style.clear="both",t.appendChild(l)}}if(document.URL.indexOf("mail.google.com")>-1){var s=document.createElement("style");s.innerHTML=".iu { visibility: hidden }",(document.getElementsByTagName("head")[0]||n).appendChild(s)}else if(document.URL.indexOf("www.facebook.com")>-1){var u=document.getElementById("home_stream");u&&(u.style.webkitTransform="translateZ(0)")}b.fixedBackground||y||(t.style.backgroundAttachment="scroll",n.style.backgroundAttachment="scroll")}}function n(e,t,n,o){if(o||(o=1e3),d(t,n),1!=b.accelerationMax){var r=+new Date,a=r-j;if(a<b.accelerationDelta){var i=(1+30/a)/2;i>1&&(i=Math.min(i,b.accelerationMax),t*=i,n*=i)}j=+new Date}if(D.push({x:t,y:n,lastX:0>t?.99:-.99,lastY:0>n?.99:-.99,start:+new Date}),!M){var c=e===document.body,l=function(r){for(var a=+new Date,i=0,s=0,u=0;u<D.length;u++){var d=D[u],f=a-d.start,m=f>=b.animationTime,p=m?1:f/b.animationTime;b.pulseAlgorithm&&(p=h(p));var v=d.x*p-d.lastX>>0,w=d.y*p-d.lastY>>0;i+=v,s+=w,d.lastX+=v,d.lastY+=w,m&&(D.splice(u,1),u--)}c?window.scrollBy(i,s):(i&&(e.scrollLeft+=i),s&&(e.scrollTop+=s)),t||n||(D=[]),D.length?A(l,e,o/b.frameRate+1):M=!1};A(l,e,0),M=!0}}function o(e){T||t();var o=e.target,r=c(o);if(!r||e.defaultPrevented||u(v,"embed")||u(o,"embed")&&/\.pdf/i.test(o.src))return!0;var a=e.wheelDeltaX||0,i=e.wheelDeltaY||0;return a||i||(i=e.wheelDelta||0),!b.touchpadSupport&&f(i)?!0:(Math.abs(a)>1.2&&(a*=b.stepSize/120),Math.abs(i)>1.2&&(i*=b.stepSize/120),n(r,-a,-i),void e.preventDefault())}function r(e){var t=e.target,o=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==S.spacebar;if(/input|textarea|select|embed/i.test(t.nodeName)||t.isContentEditable||e.defaultPrevented||o)return!0;if(u(t,"button")&&e.keyCode===S.spacebar)return!0;var r,a=0,i=0,l=c(v),s=l.clientHeight;switch(l==document.body&&(s=window.innerHeight),e.keyCode){case S.up:i=-b.arrowScroll;break;case S.down:i=b.arrowScroll;break;case S.spacebar:r=e.shiftKey?1:-1,i=-r*s*.9;break;case S.pageup:i=.9*-s;break;case S.pagedown:i=.9*s;break;case S.home:i=-l.scrollTop;break;case S.end:var d=l.scrollHeight-l.scrollTop-s;i=d>0?d+10:0;break;case S.left:a=-b.arrowScroll;break;case S.right:a=b.arrowScroll;break;default:return!0}n(l,a,i),e.preventDefault()}function a(e){v=e.target}function i(e,t){for(var n=e.length;n--;)E[L(e[n])]=t;return t}function c(e){var t=[],n=I.scrollHeight;do{var o=E[L(e)];if(o)return i(t,o);if(t.push(e),n===e.scrollHeight){if(!x||I.clientHeight+10<n)return i(t,document.body)}else if(e.clientHeight+10<e.scrollHeight&&(overflow=getComputedStyle(e,"").getPropertyValue("overflow-y"),"scroll"===overflow||"auto"===overflow))return i(t,e)}while(e=e.parentNode)}function l(e,t,n){window.addEventListener(e,t,n||!1)}function s(e,t,n){window.removeEventListener(e,t,n||!1)}function u(e,t){return(e.nodeName||"").toLowerCase()===t.toLowerCase()}function d(e,t){e=e>0?1:-1,t=t>0?1:-1,(k.x!==e||k.y!==t)&&(k.x=e,k.y=t,D=[],j=0)}function f(e){if(e){e=Math.abs(e),C.push(e),C.shift(),clearTimeout(H);var t=C[0]==C[1]&&C[1]==C[2],n=m(C[0],120)&&m(C[1],120)&&m(C[2],120);return!(t||n)}}function m(e,t){return Math.floor(e/t)==e/t}function p(e){var t,n,o;return e*=b.pulseScale,1>e?t=e-(1-Math.exp(-e)):(n=Math.exp(-1),e-=1,o=1-Math.exp(-e),t=n+o*(1-n)),t*b.pulseNormalize}function h(e){return e>=1?1:0>=e?0:(1==b.pulseNormalize&&(b.pulseNormalize/=p(1)),p(e))}var v,w,g={frameRate:60,animationTime:900,stepSize:120,pulseAlgorithm:!0,pulseScale:10,pulseNormalize:1,accelerationDelta:20,accelerationMax:1,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!0,fixedBackground:!0,excluded:""},b=g,y=!1,x=!1,k={x:0,y:0},T=!1,I=document.documentElement,C=[120,120,120],S={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},D=[],M=!1,j=+new Date,E={};setInterval(function(){E={}},1e4);var H,L=function(){var e=0;return function(t){return t.uniqueID||(t.uniqueID=e++)}}(),A=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e,t,n){window.setTimeout(e,n||1e3/60)}}(),O=window.MutationObserver||window.WebKitMutationObserver;l("mousedown",a),l("mousewheel",o),l("load",t)}})}(jQuery),function(e){e.extend({scrollToTop:function(){var t=!1;e("body").append(e("<a />").addClass("scroll-to-top").attr({href:"#",id:"scrollToTop"}).append(e("<i />").addClass("icon icon-chevron-up icon-white"))),e("#scrollToTop").click(function(t){return t.preventDefault(),e("body, html").animate({scrollTop:0},500),!1}),e(window).scroll(function(){t||(t=!0,e(window).scrollTop()>150?(e("#scrollToTop").stop(!0,!0).addClass("visible"),t=!1):(e("#scrollToTop").stop(!0,!0).removeClass("visible"),t=!1))})}})}(jQuery),function(e){e.extend({browserSelector:function(){var t=navigator.userAgent,n=t.toLowerCase(),o=function(e){return n.indexOf(e)>-1},r="gecko",a="webkit",i="safari",l="opera",s=document.documentElement,u=[!/opera|webtv/i.test(n)&&/msie\s(\d)/.test(n)?"ie ie"+parseFloat(navigator.appVersion.split("MSIE")[1]):o("firefox/2")?r+" ff2":o("firefox/3.5")?r+" ff3 ff3_5":o("firefox/3")?r+" ff3":o("gecko/")?r:o("opera")?l+(/version\/(\d+)/.test(n)?" "+l+RegExp.jQuery1:/opera(\s|\/)(\d+)/.test(n)?" "+l+RegExp.jQuery2:""):o("konqueror")?"konqueror":o("chrome")?a+" chrome":o("iron")?a+" iron":o("applewebkit/")?a+" "+i+(/version\/(\d+)/.test(n)?" "+i+RegExp.jQuery1:""):o("mozilla/")?r:"",o("j2me")?"mobile":o("iphone")?"iphone":o("ipod")?"ipod":o("mac")?"mac":o("darwin")?"mac":o("webtv")?"webtv":o("win")?"win":o("freebsd")?"freebsd":o("x11")||o("linux")?"linux":"","js"];c=u.join(" "),s.className+=" "+c;var d=!window.ActiveXObject&&"ActiveXObject"in window;return d?void e("html").removeClass("gecko").addClass("ie ie11"):void 0}})}(jQuery),function(e){var t="waitForImages";e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"]},e.expr[":"].uncached=function(t){if(!e(t).is('img[src!=""]'))return!1;var n=new Image;return n.src=t.src,!n.complete},e.fn.waitForImages=function(n,o,r){var a=0,i=0;if(e.isPlainObject(arguments[0])&&(r=arguments[0].waitForAll,o=arguments[0].each,n=arguments[0].finished),n=n||e.noop,o=o||e.noop,r=!!r,!e.isFunction(n)||!e.isFunction(o))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var c=e(this),l=[],s=e.waitForImages.hasImageProperties||[],u=/url\(\s*(['"]?)(.*?)\1\s*\)/g;r?c.find("*").addBack().each(function(){var t=e(this);t.is("img:uncached")&&l.push({src:t.attr("src"),element:t[0]}),e.each(s,function(e,n){var o,r=t.css(n);if(!r)return!0;for(;o=u.exec(r);)l.push({src:o[2],element:t[0]})})}):c.find("img:uncached").each(function(){l.push({src:this.src,element:this})}),a=l.length,i=0,0===a&&n.call(c[0]),e.each(l,function(r,l){var s=new Image;e(s).on("load."+t+" error."+t,function(e){return i++,o.call(l.element,i,a,"load"==e.type),i==a?(n.call(c[0]),!1):void 0}),s.src=l.src})})}}(jQuery),function(e){function t(e,t){return e.toFixed(t.decimals)}e.fn.countTo=function(t){return t=t||{},e(this).each(function(){function n(){u+=i,s++,o(u),"function"==typeof r.onUpdate&&r.onUpdate.call(c,u),s>=a&&(l.removeData("countTo"),clearInterval(d.interval),u=r.to,"function"==typeof r.onComplete&&r.onComplete.call(c,u))}function o(e){var t=r.formatter.call(c,e,r);l.html(t)}var r=e.extend({},e.fn.countTo.defaults,{from:e(this).data("from"),to:e(this).data("to"),speed:e(this).data("speed"),refreshInterval:e(this).data("refresh-interval"),decimals:e(this).data("decimals")},t),a=Math.ceil(r.speed/r.refreshInterval),i=(r.to-r.from)/a,c=this,l=e(this),s=0,u=r.from,d=l.data("countTo")||{};l.data("countTo",d),d.interval&&clearInterval(d.interval),d.interval=setInterval(n,r.refreshInterval),o(u)})},e.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:t,onUpdate:null,onComplete:null}}(jQuery),function(e){"use strict";var t,n={action:function(){},runOnLoad:!1,duration:500},o=n,r=!1,a={};a.init=function(){for(var t=0;t<=arguments.length;t++){var n=arguments[t];switch(typeof n){case"function":o.action=n;break;case"boolean":o.runOnLoad=n;break;case"number":o.duration=n}}return this.each(function(){o.runOnLoad&&o.action(),e(this).resize(function(){a.timedAction.call(this)})})},a.timedAction=function(e,n){var a=function(){var e=o.duration;if(r){var n=new Date-t;if(e=o.duration-n,0>=e)return clearTimeout(r),r=!1,void o.action()}i(e)},i=function(e){r=setTimeout(a,e)};t=new Date,"number"==typeof n&&(o.duration=n),"function"==typeof e&&(o.action=e),r||a()},e.fn.afterResize=function(e){return a[e]?a[e].apply(this,Array.prototype.slice.call(arguments,1)):a.init.apply(this,arguments)}}(jQuery);